function Tip(conf){
    this.ele = document.createElement("div");

    this.show = function(){
        var e = this.ele;
        e.innerHTML = conf.text;
        e.className = "tip";

        e.style.left = conf.left;
        e.style.top = conf.top;

        var small =document.createElement("div");
        small.className = "small";

        e.appendChild(small);
        document.body.appendChild(e);

        setTimeout(function(){
            e.style.opacity = 1;
        },0);
    };

    this.hide = function(){
        var e = this.ele;
        document.body.removeChild(e);
       
    }
}

HTMLElement.prototype.showTip = function(text){

    var left1 = this.offsetLeft + 36 + 10;
    var top1 = this.offsetTop + 36/2 - 23/2;
    var tip = new Tip({
        text:text,
        left:left1+"px",
        top:top1+"px"
    });

    this.onmouseover = function(){
        tip.show();
    };

    this.onmouseout = function(){
        tip.hide();
    };
};

